From 272ee10bf3158f348298af1ea04bf4004a3f8968 Mon Sep 17 00:00:00 2001 From: "sos22@donkeykong.cl.cam.ac.uk" Date: Wed, 28 Jul 2004 16:59:33 +0000 Subject: [PATCH] bitkeeper revision 1.1098.1.6 (4107db75itLJdhymWtZH0cAEBEY1jA) Disable interrupts while we're doing debug stuff, to avoid things changing underneath the user. --- xen/arch/x86/xdb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/x86/xdb.c b/xen/arch/x86/xdb.c index 8c3b49c4d9..fb95750219 100644 --- a/xen/arch/x86/xdb.c +++ b/xen/arch/x86/xdb.c @@ -318,6 +318,7 @@ __trap_to_xendbg(struct pt_regs *regs) int r; static int xendbg_running; static char recv_buf[4096]; + unsigned flags; if (xendbg_serhnd < 0) { dbg_printk("Debugger not ready yet.\n"); @@ -337,6 +338,10 @@ __trap_to_xendbg(struct pt_regs *regs) obvious reason, which is Bad */ printk("Waiting for GDB to attach to XenDBG\n"); + /* Try to make things a little more stable by disabling + interrupts while we're here. */ + local_irq_save(flags); + while (resume == 0) { r = receive_command(recv_buf); if (r < 0) { @@ -346,6 +351,7 @@ __trap_to_xendbg(struct pt_regs *regs) resume = process_command(recv_buf, regs); } xendbg_running = 0; + local_irq_restore(flags); } void -- 2.30.2